package com.example.weather_app.diary;

import java.io.Serializable;
import java.util.Date;

public class Diary implements Serializable {
    private String id;
    private String title;
    private String content;
    private String date;          // 格式: "YYYY-MM-DD"
    private String reminderTime;  // 格式: "YYYY-MM-DD HH:MM:SS"
    private Date createdAt;

    // 无参构造函数
    public Diary() {}

    // 全参构造函数
    public Diary(String id, String title, String content, String date, String reminderTime) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.date = date;
        this.reminderTime = reminderTime;
        this.createdAt = new Date();
    }

    // Getters and Setters
    public String getId() { return id; }
    public void setId(String id) { this.id = id; }

    public String getTitle() { return title; }
    public void setTitle(String title) { this.title = title; }

    public String getContent() { return content; }
    public void setContent(String content) { this.content = content; }

    public String getDate() { return date; }
    public void setDate(String date) { this.date = date; }

    public String getReminderTime() { return reminderTime; }
    public void setReminderTime(String reminderTime) { this.reminderTime = reminderTime; }

    public Date getCreatedAt() { return createdAt; }
    public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; }
}